import { createApp } from 'vue'

// 引入路由
import router from './router'
// 引入仓库
import store from './store'
// 引入elementUIPULS和样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'


// 引入icon图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


// 引入全局样式
import './assets/css/global.css'
// 引入字体
import './assets/css/iconfont.css'

// 引入mockjs
import './mock/index'

import App from './App.vue'

// 将单页面App组件挂在到Vue上
const app = createApp(App)
// 注册icon图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// 使用use注册路由并渲染到app上
app.use(router)
app.use(store)
app.use(ElementPlus)
app.mount('#app')
